home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectPlay / Conferencer / frmJoinRequest.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-08  |  3.5 KB  |  104 lines

  1. VERSION 5.00
  2. Begin VB.Form frmJoinRequest 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Receiving a call...."
  5.    ClientHeight    =   975
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4680
  9.    ControlBox      =   0   'False
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   975
  14.    ScaleWidth      =   4680
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.CommandButton cmdReject 
  18.       Cancel          =   -1  'True
  19.       Caption         =   "Reject"
  20.       Height          =   315
  21.       Left            =   3420
  22.       TabIndex        =   3
  23.       Top             =   120
  24.       Width           =   1155
  25.    End
  26.    Begin VB.CommandButton cmdAccept 
  27.       Caption         =   "Accept"
  28.       Default         =   -1  'True
  29.       Height          =   315
  30.       Left            =   3420
  31.       TabIndex        =   2
  32.       Top             =   540
  33.       Width           =   1155
  34.    End
  35.    Begin VB.Label lblFriend 
  36.       BackStyle       =   0  'Transparent
  37.       Height          =   195
  38.       Left            =   720
  39.       TabIndex        =   1
  40.       Top             =   420
  41.       Width           =   2115
  42.    End
  43.    Begin VB.Label Label1 
  44.       BackStyle       =   0  'Transparent
  45.       Caption         =   "You are receiving a call from"
  46.       Height          =   195
  47.       Left            =   720
  48.       TabIndex        =   0
  49.       Top             =   180
  50.       Width           =   2115
  51.    End
  52.    Begin VB.Image Image1 
  53.       Height          =   480
  54.       Left            =   120
  55.       Picture         =   "frmJoinRequest.frx":0000
  56.       Top             =   180
  57.       Width           =   480
  58.    End
  59. Attribute VB_Name = "frmJoinRequest"
  60. Attribute VB_GlobalNameSpace = False
  61. Attribute VB_Creatable = False
  62. Attribute VB_PredeclaredId = True
  63. Attribute VB_Exposed = False
  64. Option Explicit
  65. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  66. '  Copyright (C) 1999-2001 Microsoft Corporation.  All Rights Reserved.
  67. '  File:       frmJoinRequest.frm
  68. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  69. Private mlPlayerID As Long
  70. Private msPlayername As String
  71. Private moForm As frmNetwork
  72. Public Sub SetupRequest(oForm As frmNetwork, ByVal lPlayerID As Long, ByVal sPlayerName As String)
  73.     Set moForm = oForm
  74.     mlPlayerID = lPlayerID
  75.     msPlayername = sPlayerName
  76.     lblFriend.Caption = sPlayerName
  77. End Sub
  78. Private Sub cmdAccept_Click()
  79.     Dim lMsg As Long, lOffset As Long
  80.     Dim oBuf() As Byte
  81.     'Accept this connection
  82.     lMsg = MsgAcceptJoin
  83.     lOffset = NewBuffer(oBuf)
  84.     AddDataToBuffer oBuf, lMsg, LenB(lMsg), lOffset
  85.     dpp.SendTo mlPlayerID, oBuf, 0, DPNSEND_NOLOOPBACK
  86.     moForm.UpdatePlayerList
  87.     'Notify everyone that this player has joined
  88.     lMsg = MsgNewPlayerJoined
  89.     lOffset = NewBuffer(oBuf)
  90.     AddDataToBuffer oBuf, lMsg, LenB(lMsg), lOffset
  91.     dpp.SendTo DPNID_ALL_PLAYERS_GROUP, oBuf, 0, DPNSEND_NOLOOPBACK Or DPNSEND_GUARANTEED
  92.     Unload Me
  93. End Sub
  94. Private Sub cmdReject_Click()
  95.     Dim lMsg As Long, lOffset As Long
  96.     Dim oBuf() As Byte
  97.     'Reject this connection
  98.     lMsg = MsgRejectJoin
  99.     lOffset = NewBuffer(oBuf)
  100.     AddDataToBuffer oBuf, lMsg, LenB(lMsg), lOffset
  101.     dpp.SendTo mlPlayerID, oBuf, 0, DPNSEND_NOLOOPBACK
  102.     Unload Me
  103. End Sub
  104.